package com.ta.gulimall.product.feign;

import com.ta.gulimall.common.view.to.UpSpuInfoTo;
import com.ta.gulimall.common.utils.system.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

@FeignClient("gulimall-elasticsearch")
public interface ElasticsearchFeignService {

    /**
     * 上架的spu商品信息保存到elasticsearch
     * @param upSpuInfoToList
     * @return
     */
    @PostMapping("/elasticsearch/productSave")
    R productSave(@RequestBody List<UpSpuInfoTo> upSpuInfoToList);
}
